struct ListNode* removeElements(struct ListNode* head, int val){
      struct ListNode* fast=head;
      struct ListNode* slow=NULL;

      while(fast)
      {
          if(fast->val == val)
          {
              if(slow)
              {
                  slow->next=fast->next;
                  free(fast);
                  fast=slow->next;
              }
              else
              { 
                fast=fast->next;
                free(head);
                head=fast;
              }
          }
          else
          {
              slow=fast;
              fast=fast->next;
          }
      }
    return head;
}
